package com.fita.webpay.entity.config;

import org.apache.commons.lang3.StringUtils;
import com.demo2do.core.wechat.entity.pay.PayConfig;

public class HandpayConfig implements PayConfig {
    
    private String appid;
    
    private String appNum;

    private String sellerId;

    private String notifyUrl;

    private String remoteIp;
    
    /**
     * 订单币种
     * 默认156
     */
    private String currencyCode;
    
    /**
     * 产品类型
     * 默认 100000
     */
    private String productType;
    
    /**
     * 支付类型
     * 默认 2008
     */
    private String paymentType;
    
    public HandpayConfig() {
    }
    
    /**
     * 
     * @param appid
     * @param appNum
     * @param sellerId
     * @param notifyUrl
     */
    public HandpayConfig(String appid, String appNum, String sellerId, String notifyUrl) {
        this.appid = appid;
        this.appNum = appNum;
        this.sellerId = sellerId;
        this.notifyUrl = notifyUrl;
        this.currencyCode = "156";
        this.productType = "100000";
        this.paymentType = "2008";
    }
    
    public HandpayConfig(String sellerId) {
        this.sellerId = sellerId;
    }
    
    /*
     * (non-Javadoc)
     * @see com.demo2do.core.wechat.entity.pay.PayConfig#match(java.lang.String, java.lang.String)
     */
    public boolean match(String appid, String sellerId) {
        return StringUtils.equals(this.sellerId, sellerId);
    }
    
    /**
     * @return the appid
     */
    public String getAppid() {
        return appid;
    }


    /**
     * @return the appNum
     */
    public String getAppNum() {
        return appNum;
    }


    /**
     * @return the sellerId
     */
    public String getSellerId() {
        return sellerId;
    }


    /**
     * @return the notifyUrl
     */
    public String getNotifyUrl() {
        return notifyUrl;
    }


    /**
     * @return the remoteIp
     */
    public String getRemoteIp() {
        return remoteIp;
    }


    /**
     * @return the currencyCode
     */
    public String getCurrencyCode() {
        return currencyCode;
    }


    /**
     * @return the productType
     */
    public String getProductType() {
        return productType;
    }


    /**
     * @return the paymentType
     */
    public String getPaymentType() {
        return paymentType;
    }


    /**
     * @param appid the appid to set
     */
    public void setAppid(String appid) {
        this.appid = appid;
    }


    /**
     * @param appNum the appNum to set
     */
    public void setAppNum(String appNum) {
        this.appNum = appNum;
    }


    /**
     * @param sellerId the sellerId to set
     */
    public void setSellerId(String sellerId) {
        this.sellerId = sellerId;
    }


    /**
     * @param notifyUrl the notifyUrl to set
     */
    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }


    /**
     * @param remoteIp the remoteIp to set
     */
    public void setRemoteIp(String remoteIp) {
        this.remoteIp = remoteIp;
    }


    /**
     * @param currencyCode the currencyCode to set
     */
    public void setCurrencyCode(String currencyCode) {
        this.currencyCode = currencyCode;
    }


    /**
     * @param productType the productType to set
     */
    public void setProductType(String productType) {
        this.productType = productType;
    }


    /**
     * @param paymentType the paymentType to set
     */
    public void setPaymentType(String paymentType) {
        this.paymentType = paymentType;
    }
}
